#!/usr/bin/env python
from CVSView import CVSStatus, CVSCheck
from CVSModel import CVSModel
from CVSConstants import *

class CVSCheckout(CVSModel):
  def _createCmd(self):
    dlg = CVSCheck()
    user, server, path, module, prot = dlg.getRepository()
    return ['cvs', '-z3', '-d', ':%s:%s@%s:%s' % (prot, user, server, path),
            'co', '-P', module]
    
  def getAction(self):
    return 'CVS Checkout'
    
  def getActivity(self):
    return 'Retrieving'

if __name__ == '__main__':
  m = CVSCheckout()
  v = CVSStatus(m)
  m.start()
